package test.composite;

import dk.au.cs.peterbn.annotations.Member;
import dk.au.cs.peterbn.annotations.Pattern;

/**
 * Created by IntelliJ IDEA.
 * User: peter
 * Date: 10/28/11
 * Time: 12:20 PM
 * To change this template use File | Settings | File Templates.
 */
@Pattern(id = "test.composite", name = "gof:Composite", role = "Component")
public abstract class Component {

    @Member(id = "test.composite", role = "Operation")
    public abstract void operation();

    @Member(id = "test.composite", role = "Add")
    public void add(Component child) {
        //Do nothing as default
    }

    @Member(id = "test.composite", role = "Remove")
    public void remove(Component child) {
        //Do nothing as default
    }

    @Member(id = "test.composite", role = "GetChild")
    public Component getChild(int index) {
        return null; //Default implementation
    }
}
